function mixinArray<T, S>(arr: T[], strs: S[]): (T | S)[] {
  const newArr: (T | S)[] = [];

  if (arr.length !== strs.length) {
    throw new Error("两个数组长度不等");
  }

  for (let i = 0; i < arr.length; i++) {
    newArr.push(arr[i]);
    newArr.push(strs[i]);
  }

  return newArr;
}

console.log(mixinArray([1, 2, 3, 4], ["1", "2", "3", "4"]));

export {};
